//浏览器窗口大于800
if(window.innerWidth > 800){
    var swiper1 = new Swiper('.swiper-1', {
        slidesPerView: 3.5,
        spaceBetween: 15,
        autoplay:true,
        centeredSlides : false,
        freeMode: true,
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },
    });
}else{
    var swiper1 = new Swiper('.swiper-1', {
        slidesPerView: 1,
        spaceBetween: 15,
        autoplay:true,
        centeredSlides : false,
        freeMode: true,
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },
    });
}

var ban = document.querySelector('#ban');
var si = document.querySelector('.shi');
ban.addEventListener('click',function(){
    si.style.display='block'
});
si.addEventListener('click',function(){
    si.style.display='none'
});

var fan = document.querySelector(".fan");

fan.addEventListener('click', function () {
    window.scrollTo({
        top: 0,
        behavior: 'smooth'
    });
});


